#include <iostream>
#include <vector>

using namespace std;

class Solution 
{
public:
    void reverseString(vector<char>& s) 
    {
        for(int i = 0; i < s.size() / 2; i++)
        {
            int temp = s[i];
            s[i] = s[s.size() - i - 1];
            s[s.size() - i - 1] = temp;
        }
    }
};
int main() 
{
    Solution sol;

    // 测试用例1
    vector<char> s1 = {'h', 'e', 'l', 'l', 'o'};
    sol.reverseString(s1);
    for (char c : s1) cout << c;
    cout << endl; // 输出: "olleh"

    // 测试用例2
    vector<char> s2 = {'H', 'a', 'n', 'n', 'a', 'h'};
    sol.reverseString(s2);
    for (char c : s2) cout << c;
    cout << endl; // 输出: "hannaH"

    // 测试用例3
    vector<char> s3 = {'a'};
    sol.reverseString(s3);
    for (char c : s3) cout << c;
    cout << endl; // 输出: "a"

    // 测试用例4
    vector<char> s4 = {};
    sol.reverseString(s4);
    for (char c : s4) cout << c;
    cout << endl; // 输出: ""

    return 0;
}
